/**
 * 
 */
package com.fsoft.tinhcd.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author caodangtinh
 * 
 */
@Entity
@Table(name = "Employee", schema = "hibernate")
public class Employee {
	private int employeeId;
	private String firstName;
	private String lastName;
	private Date birthDate;
	private String cellPhone;
	private Department department;

	/**
	 * 
	 */
	public Employee() {
		super();
	}

	/**
	 * @param firstName
	 * @param lastName
	 * @param birthDate
	 * @param cellPhone
	 */
	public Employee(String firstName, String lastName, Date birthDate,
			String cellPhone) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.birthDate = birthDate;
		this.cellPhone = cellPhone;
	}

	/**
	 * @param firstName
	 * @param lastName
	 * @param birthDate
	 * @param cellPhone
	 * @param department
	 */
	public Employee(String firstName, String lastName, Date birthDate,
			String cellPhone, Department department) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.birthDate = birthDate;
		this.cellPhone = cellPhone;
		this.department = department;
	}

	/**
	 * @return the employeeId
	 */
	@Id
	@GeneratedValue
	@Column(name = "EMPLOYEE_ID", unique = true, nullable = false)
	public int getEmployeeId() {
		return employeeId;
	}

	/**
	 * @param employeeId
	 *            the employeeId to set
	 */
	public void setEmployeeId(int employeeId) {
		this.employeeId = employeeId;
	}

	/**
	 * @return the firstName
	 */
	@Column(name = "FIRST_NAME", length = 50, nullable = false)
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @param firstName
	 *            the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @return the lastName
	 */
	@Column(name = "LAST_NAME", length = 50, nullable = false)
	public String getLastName() {
		return lastName;
	}

	/**
	 * @param lastName
	 *            the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @return the birthDate
	 */
	@Column(name = "BIRTH_DATE")
	public Date getBirthDate() {
		return birthDate;
	}

	/**
	 * @param birthDate
	 *            the birthDate to set
	 */
	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	/**
	 * @return the cellPhone
	 */
	@Column(name = "CELL_PHONE", length = 20, nullable = false)
	public String getCellPhone() {
		return cellPhone;
	}

	/**
	 * @param cellPhone
	 *            the cellPhone to set
	 */
	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	/**
	 * @return the department
	 */
	@ManyToOne
	@JoinColumn(name = "DEPARTMENT_ID")
	public Department getDepartment() {
		return department;
	}

	/**
	 * @param department
	 *            the department to set
	 */
	public void setDepartment(Department department) {
		this.department = department;
	}

}
